﻿using System;

// "Prototype"
abstract class Prototype
{
    // Fields
    private string id;

    // Constructors
    public Prototype(string id)
    {
        this.id = id;
    }

    public string Id
    {
        get { return id; }
    }

    // Methods
    abstract public Prototype Clone();
}

// "ConcretePrototype1"
class ConcretePrototype1 : Prototype
{
    // Constructors
    public ConcretePrototype1(string id) : base(id) { }

    // Methods
    override public Prototype Clone()
    {
        // Shallow copy
        return (Prototype)this.MemberwiseClone();
    }
}

// "ConcretePrototype2"
class ConcretePrototype2 : Prototype
{
    // Constructors
    public ConcretePrototype2(string id) : base(id) { }

    // Methods
    override public Prototype Clone()
    {
        // Shallow copy
        return (Prototype)this.MemberwiseClone();
    }
}